//
//  UIBaseTableViewController.m
//  QuickCure1
//
//  Created by Apple on 16/11/5.
//  Copyright © 2016年 maoge. All rights reserved.
//

#import "UIBaseTableViewController.h"


@interface UIBaseTableViewController ()

@end

@implementation UIBaseTableViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    
    
    [self setUpLeftButtonItem];
    
    [Adapter adapt:self];
    
    
}

/*
 *  默认修改了左上角的item值
 */
- (void)setUpLeftButtonItem{
    
    UIButton *leftBtn = [[UIButton alloc] initWithFrame:CGRectMake(0, 0, 40, 40)];
    [leftBtn setImage:[UIImage imageNamed:@"jiantou"] forState:UIControlStateNormal];
    [leftBtn addTarget:self action:@selector(goBack) forControlEvents:UIControlEventTouchUpInside];
    self.navigationItem.leftBarButtonItem = [[UIBarButtonItem alloc] initWithCustomView:leftBtn];
    
    
}

/*
 *  如果想任意跳转，就重写goBack方法
 */
- (void)goBack{
    
    [self.navigationController popViewControllerAnimated:YES];
}

-(void)viewWillAppear:(BOOL)animated{
    
    [self.tableView reloadData];
    
}


@end
